package com.penghaisoft.microwms.common.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.ModelAttribute;
import javax.servlet.http.HttpServletResponse;

/**
 * 手持controller基类
 */
@Slf4j
public class HandBaseController {


	@Autowired
	public StringRedisTemplate redisTemplate;

	/**
	 * @Description: 开发时允许跨域请求
	 * @author zxcq0
	 * @date 2017/3/10 13:40
	 * @param
	 * @return
	 */
	@ModelAttribute
	private void allowCrossDomain(HttpServletResponse response){
		response.addHeader("Access-Control-Allow-Origin","*");
	}


}
